﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Logs.aspx.cs" Inherits="WorldBankBBS.Management.Admin.Logs" %>
<%@ Register src="AdminNavigation.ascx" tagname="AdminNavigation" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">    <section class="featured">
        <div class="content-wrapper">
            <hgroup class="title">
                <h1>Logs.</h1>
                <h2>Read system logs.</h2>
            </hgroup>
        </div>
    </section>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Navigation" runat="server">
    <uc1:AdminNavigation ID="AdminNavigation1" runat="server" />
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" CssClass="dataTable">
        <Columns>
            <asp:BoundField DataField="UserName" HeaderText="User" SortExpression="UserName" />
            <asp:BoundField DataField="Alias" HeaderText="Alias" SortExpression="Alias" />
            <asp:BoundField DataField="RealName" HeaderText="Name" SortExpression="RealName" />
            <asp:BoundField DataField="EMailAddress" HeaderText="EMail" SortExpression="EMailAddress" />
            <asp:BoundField DataField="Timestamp" HeaderText="Timestamp" SortExpression="Timestamp" />
            <asp:BoundField DataField="Message" HeaderText="Message" SortExpression="Message" />
            <asp:BoundField DataField="Extended" HeaderText="Extended" SortExpression="Extended" />
            <asp:BoundField DataField="StartedOn" HeaderText="Started" SortExpression="StartedOn" />
            <asp:BoundField DataField="EndedOn" HeaderText="Ended" SortExpression="EndedOn" />
            <asp:BoundField DataField="Encoding" HeaderText="Encoding" SortExpression="Encoding" />
            <asp:BoundField DataField="RemoteIP" HeaderText="RemoteIP" SortExpression="RemoteIP" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=bbs.paytonbyrd.com;Initial Catalog=WorldBankBBS;Persist Security Info=True;User ID=WorldBankBBS_user;Password=12345;MultipleActiveResultSets=True;Application Name=EntityFramework" ProviderName="System.Data.SqlClient" SelectCommand="SELECT [User].UserName, [User].Alias, [User].RealName, [User].EMailAddress, [Log].Timestamp, [Log].Message, [Log].Extended, Session.StartedOn, Session.EndedOn, Session.Encoding, Session.RemoteIP FROM [Log] INNER JOIN Session ON [Log].SessionUID = Session.SessionUID LEFT OUTER JOIN [User] ON Session.UserUID = [User].UserUID ORDER BY [Log].Timestamp DESC"></asp:SqlDataSource>
</asp:Content>
